import $http from '../request';

const URL_PREFIX = '/system/menu';

export const $SysMenuApi = {

	getTopMenus: () => {
		return $http.$get(URL_PREFIX + "/getTopMenus");
	},

	getSubMenusByParentId: (parentId) => {
		return $http.$get(URL_PREFIX + "/getSubMenusByParentId?parentId=" + parentId)
	},

	getMenuData: () => {
		return $http.$get(URL_PREFIX + "/getMenuData")
	},

	getMenuVoList: (searchParam) => {
		return $http.$get(URL_PREFIX + "/getMenuVoList?searchParam=" + searchParam)
	},

	addMenu: (menuParams) => {
		return $http.$post(URL_PREFIX + "/add", menuParams, {});
	},

	batchDelete: (param) => {
		return $http.$post(URL_PREFIX + '/batchRemove', param, {})
	},

	listTopMenus: (params) => {
		return $http.$post(URL_PREFIX + '/listTopMenus', params, {})
	},

	getMenuInfoMap: () => {
		return $http.$get(URL_PREFIX + "/getMenuInfoMap", {}, {})
	},

	


}
